#include <stdio.h>

int arr[10] = {};
int max,min;
int input(int* arr,int lenght){
	int *p,*arrend;
	max = min = *arr;
	for(p=arr+1;p<arr+lenght;p++){
		if(*p>max) max = *p;
		if(*p<min) min = *p;
	}
}

int main (){
	int arr[10]={10,2,3,4,5,6,7,8,9,0};
	input(arr,10);
	printf("max = %d min = %d \n",max,min);
}
